home *** CD-ROM | disk | FTP | other *** search
/ Curio City 11 / CURIO11.bin / pc / movie / start.dir / 01030_îƒóp ›ƒ€×(ÇUçÜ.ls < prev    next >
Encoding:
Text File  |  1998-01-01  |  2.4 KB  |  132 lines

  1. on getday6
  2.   set ltoday to the short date
  3.   set lolddelimiter to the itemDelimiter
  4.   if the machineType <> 256 then
  5.     set the itemDelimiter to "."
  6.   else
  7.     set the itemDelimiter to "/"
  8.   end if
  9.   set ly to value(item 1 of ltoday)
  10.   set lm to value(item 2 of ltoday)
  11.   set ld to value(item 3 of ltoday)
  12.   set the itemDelimiter to lolddelimiter
  13.   if lm >= 5 then
  14.     return 100
  15.   end if
  16.   if lm = 2 then
  17.     return ld
  18.   end if
  19.   if lm = 3 then
  20.     return ld + 28
  21.   end if
  22.   if lm = 4 then
  23.     return ld + 28 + 31
  24.   end if
  25.   if lm <= 1 then
  26.     if ld = 31 then
  27.       return 0
  28.     end if
  29.     if ld = 30 then
  30.       return -1
  31.     end if
  32.     if ld = 29 then
  33.       return -2
  34.     end if
  35.     if ld < 29 then
  36.       return 100
  37.     end if
  38.   end if
  39. end
  40.  
  41. on getday7
  42.   set ltoday to the short date
  43.   set lolddelimiter to the itemDelimiter
  44.   if the machineType <> 256 then
  45.     set the itemDelimiter to "."
  46.   else
  47.     set the itemDelimiter to "/"
  48.   end if
  49.   set ly to value(item 1 of ltoday)
  50.   set lm to value(item 2 of ltoday)
  51.   set ld to value(item 3 of ltoday)
  52.   set the itemDelimiter to lolddelimiter
  53.   if lm >= 8 then
  54.     return 200
  55.   end if
  56.   if lm = 3 then
  57.     return ld
  58.   end if
  59.   if lm = 4 then
  60.     return ld + 31
  61.   end if
  62.   if lm = 5 then
  63.     return ld + 31 + 30
  64.   end if
  65.   if lm = 6 then
  66.     return ld + 31 + 30 + 31
  67.   end if
  68.   if lm = 7 then
  69.     return ld + 31 + 30 + 31 + 30
  70.   end if
  71.   if lm <= 1 then
  72.     if ld = 31 then
  73.       return 0
  74.     end if
  75.     if ld = 30 then
  76.       return -1
  77.     end if
  78.     if ld = 29 then
  79.       return -2
  80.     end if
  81.     if ld < 29 then
  82.       return 100
  83.     end if
  84.   end if
  85. end
  86.  
  87. on getday8
  88.   set ltoday to the short date
  89.   set lolddelimiter to the itemDelimiter
  90.   if the machineType <> 256 then
  91.     set the itemDelimiter to "."
  92.   else
  93.     set the itemDelimiter to "/"
  94.   end if
  95.   set ly to value(item 1 of ltoday)
  96.   set lm to value(item 2 of ltoday)
  97.   set ld to value(item 3 of ltoday)
  98.   set the itemDelimiter to lolddelimiter
  99.   if lm >= 11 then
  100.     return 200
  101.   end if
  102.   if lm = 6 then
  103.     return ld
  104.   end if
  105.   if lm = 7 then
  106.     return ld + 30
  107.   end if
  108.   if lm = 8 then
  109.     return ld + 30 + 31
  110.   end if
  111.   if lm = 9 then
  112.     return ld + 30 + 31 + 30
  113.   end if
  114.   if lm = 10 then
  115.     return ld + 30 + 31 + 30 + 31
  116.   end if
  117.   if lm <= 1 then
  118.     if ld = 31 then
  119.       return 0
  120.     end if
  121.     if ld = 30 then
  122.       return -1
  123.     end if
  124.     if ld = 29 then
  125.       return -2
  126.     end if
  127.     if ld < 29 then
  128.       return 100
  129.     end if
  130.   end if
  131. end
  132.